import time

from selenium import webdriver

from ..common.ui.Selector import Selector
from .Combobox import Combobox

import pytest


def test_set_value():
    browser = webdriver.Chrome()
    browser.maximize_window()
    browser.get("https://fish.iwhalecloud.com/fish-desktop/examples/combobox/index.html")
    time.sleep(2)
    try:
        combobox = Combobox(browser, 'combobox1', Selector.ID)
        combobox.setValue('Arizona')
        time.sleep(2)
    finally:
        browser.close()


if __name__ == '__main__':
    pytest.main(['-s','Combobox_test.py'])